package com.kaibes.platform.currency.admin;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.kaibes.web.admin.AdminMenu;
import com.kaibes.web.admin.AdminMenuRes;

@Configuration
public class CurrencyMenuInit {

    @Bean
    public AdminMenu currencyMenu() {
        AdminMenu parent = new AdminMenu();
        parent.setKey("currency");
        parent.setName("货币模块");
        parent.setIcon("fas fa-money-bill");
        parent.setHref("");
        parent.setSort(3);
        parent.setParentKey(AdminMenuRes.MENU_MAIN);
        return parent;
    }
    
    @Bean
    public AdminMenu currencyTypeMenu() {
        AdminMenu menu = new AdminMenu();
        menu.setKey("currency-type");
        menu.setName("货币类型");
        menu.setIcon("fab fa-btc");
        menu.setHref("/admin/currency/type");
        menu.setSort(1);
        menu.setParentKey("currency");
        return menu;
    }
    
    @Bean
    public AdminMenu currencyExchangeMenu() {
        AdminMenu menu = new AdminMenu();
        menu.setKey("currency-exchange");
        menu.setName("货币汇率");
        menu.setIcon("fas fa-exchange-alt");
        menu.setHref("/admin/currency/exchange");
        menu.setSort(2);
        menu.setParentKey("currency");
        return menu;
    }
    
    @Bean
    public AdminMenu currencyUserMenu() {
        AdminMenu menu = new AdminMenu();
        menu.setKey("currency-user");
        menu.setName("货币持有");
        menu.setIcon("fas fa-money-check-alt");
        menu.setHref("/admin/currency/user");
        menu.setSort(3);
        menu.setParentKey("currency");
        return menu;
    }
    
}
